MainGimbal

Main gimbal peripheral interface for drones.

This provides control of the mechanical gimbal "holding" and orientating the drone main camera.

The gimbal can act on one or multiple axes. It can stabilize a given axis, meaning that the movement on this axis will be following the horizon (for PITCH and ROLL) or the North (for the YAW).

Two frames of reference are used to control the gimbal with the POSITION mode, and to retrieve the gimbal attitude.

ABSOLUTE:

  • yaw: given angle is relative to the magnetic North (clockwise).
  • pitch: given angle is relative to the horizon. Positive pitch values means an orientation towards sky.
  • roll: given angle is relative to the horizon line. Positive roll values means an orientation to the right when seeing the gimbal from behind.

RELATIVE:

  • yaw: given angle is relative to the heading of the drone. Positive yaw values means a right orientation when seeing the gimbal from above.
  • pitch: given angle is relative to the body of the drone. Positive pitch values means an orientation of the gimbal towards the top of the drone.
  • roll: given angle is relative to the body of the drone. Positive roll values means an clockwise rotation of the gimbal.

This peripheral can be obtained from a drone using:

drone.getPeripheral(Gimbal.class)

See also

com.parrot.drone.groundsdk.device.Drone

Types

Link copied to clipboard
enum Axis
Gimbal axis.
Link copied to clipboard
Way of controlling the gimbal.
Link copied to clipboard
Frame of reference.
Link copied to clipboard
Gimbal offsets manual correction process.

Functions

Link copied to clipboard
abstract fun cancelCalibration()
Cancels the current calibration process.
Link copied to clipboard
abstract fun control(@NonNull mode: MainGimbal.ControlMode, @Nullable yaw: Double, @Nullable pitch: Double, @Nullable roll: Double)
Controls the gimbal.
Link copied to clipboard
Reports any error that the gimbal is currently undergoing.
Link copied to clipboard
abstract fun getAttitude(@NonNull axis: MainGimbal.Axis): Double
Retrieves current attitude of an axis in the current frame of reference, in degrees.
Retrieves current attitude of an axis in a given frame of reference, in degrees.
Link copied to clipboard
Retrieves attitude bounds of an axis in the current frame of reference, in degrees.
Link copied to clipboard
Gets calibration process state.
Link copied to clipboard
Gets currently locked axes.
Link copied to clipboard
Retrieves the maximum speed setting of an axis, in degrees per second.
Link copied to clipboard
Gets offsets correction process.
Link copied to clipboard
Retrieves the stabilization setting of an axis.
Link copied to clipboard
Gets all supported axes, i.e.
Link copied to clipboard
abstract fun isCalibrated(): Boolean
Tells whether the gimbal is calibrated.
Link copied to clipboard
abstract fun resetAttitude()
Resets gimbal attitude.
Link copied to clipboard
abstract fun startCalibration()
Starts calibration process.
Link copied to clipboard
Starts the offsets correction process.
Link copied to clipboard
Stops the offsets correction process.